
import json
from copy import deepcopy
from . import factory

def get(form_set_options,chart):
    # print(form_set_options,chart)
    plots_return = getattr(factory[chart], 'example_params')
    set_options = deepcopy(plots_return()['set_options'])
    for key in form_set_options.keys():
        try:
            if type(set_options[key]) == float:
                set_options[key] = form_set_options[key]/100
                continue
            set_options[key] = form_set_options[key]
        except:
            pass
    return set_options